package com.googlecode.FWT.controller
{
	import com.googlecode.FWT.model.ProjectDataProxy;
	
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;
	import org.puremvc.as3.patterns.observer.Notification;

	/**
	 * Changes the user name on ProjectSettingsProxy. 
	 * @author USER
	 * 
	 */
	public class EssayTitleChangedCommand extends SimpleCommand
	{
		/**
		 * Execute command. 
		 * @param notification
		 * 
		 */
		override public function execute(notification:INotification):void
		{
			// get a reference to ProjectDataProxy
			var proxy:ProjectDataProxy = facade.retrieveProxy(ProjectDataProxy.NAME) as ProjectDataProxy;

			// set the new essay title field text
			proxy.essayTitle = notification.getBody() as String;
		}
		
	}
}